package com.hk.patterntrains.factorypattern.abstractfactory;

public class ChicagoPizzaStore extends PizzaStore {

    private  AbstractMaterialFactory materialFactory;
    public ChicagoPizzaStore() {
        this.materialFactory = new ChicagoMaterialFactory();
    }
    @Override
    protected Pizza createPizza() {
        Pizza pizza = new Pizza();
        pizza.setTypeA(materialFactory.createMaterialTypeA());
        pizza.setTypeB(materialFactory.createMaterialTypeB());
        return pizza;
    }
}
